<?php 
class indexAction extends sfAction{
	public function execute($request){
		$data['supports'] = News::getIndexSupports();
		$data['id'] = $request->getParameter('id', 0);
		if(intval($data['id']) == 0){
			$data['id'] = intval($data['supports'][0]['id']);
		}
		$data['content']	= News::getIndexDetail($data['id']);
		#print_r($data);die;
		$this->setVar('data', $data);
	}
}